package com.gxa.modules.mapper;

import com.gxa.modules.pojo.CustComplian;
import com.gxa.modules.pojo.WaybillAbnormal;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface WaybillAbnormalMapper{
    /**
     * 分页查询运单异常
     * @return
     */
    int findCountWaybill(@Param("status") Integer status);
    List<Map> findWaybillAbnormal(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize, @Param("status") Integer status);

    /**
     * 增加运单异常接口
     * @param waybillAbnormal
     * @return
     */
    int addWaybillAbnormal(WaybillAbnormal waybillAbnormal);

    /**
     * 删除运单异常
     * @param id
     * @param status
     * @return
     */
    int deleteWaybillAbnormal(@Param("id") Integer id, @Param("status") Integer status);

    /**
     * 批量删除运单异常
     * @param ids
     * @param status
     * @return
     */
    int deleteWaybillAbnormalList(@Param("ids") int[] ids, @Param("status") Integer status);

    /**
     * 修改运单异常
     * @param waybillAbnormal
     * @return
     */
    int updateWaybillAbnormal(WaybillAbnormal waybillAbnormal);
    /**
     * 运单异常查看显示接口
     * @param id
     * @return
     */
    List<CustComplian> seeWaybillAbnormal(@Param("id") Integer id);

    /**
     * 添加处理
     * @param id
     * @param deal_note
     * @param deal_time
     * @return
     */
    int dealWaybillAbnormal(@Param("id") Integer id, @Param("dealNote") String deal_note, @Param("dealTime") String deal_time);
    /**
     * 添加完结
     * @param id
     * @param end_note
     * @param end_time
     * @return
     */
    int endWaybillAbnormal(@Param("id") Integer id, @Param("endNote") String end_note, @Param("endTime") String end_time);

    /**
     * 条件搜索运单异常
     * @param waybill_number
     * @param abnor_link
     * @param type
     * @param time
     * @param status
     * @return
     */
    List<Map> searchWaybillAbnormal(@Param("waybillNumber") String waybill_number, @Param("abnorLink") Integer abnor_link,
                                    @Param("type") Integer type, @Param("time") String time, @Param("status") Integer status);
}
